<extend name='Index:index'/>
<block name='admin_right'>
	<div class="right col-md-9">
			<table class="table table-bordered">
				<tr>
					<th>序号</th>
					<th>商品名称</th>
					<th>图片</th>
					<th>价格</th>
					<th>库存</th>
					<th>是否上架</th>
					<th>品牌</th>
					<th>分类</th>
					<th>修改</th>
					<th>删除</th>
				</tr>
				<volist name='rows' id='row'>
				<tr>
					<td style="line-height: 50px;"><{$row['id']}></td>
					<td style="line-height: 50px;"><{$row['name']}></td>
					<td style="line-height: 50px;"><img src="__PUBLIC__/upload/shop/t_<{$row['img']}>" style='width:50px;' alt=""  ></td>
					<td style="line-height: 50px;"><{$row['price']}></td>
					<td style="line-height: 50px;"><{$row['stock']}></td>
					<if condition="$row['shelf'] eq 1"> 
						<if condition="$row['stock'] lt 1"> <!-- 库存小于1时让商品下架 -->
							<td style="line-height: 50px;">下架</td>
						<else/>
							<td style="line-height: 50px;">上架</td>
						</if>
					<else/>
						<td style="line-height: 50px;">下架</td>
					</if>
					<td style="line-height: 50px;"><{$row['bname']}></td>
					<td style="line-height: 50px;"><{$row['cname']}></td>
					<td style="line-height: 50px;"><a href="<{:U('edit','','')}>/id/<{$row['id']}>">修改</a></td>
					<td style="line-height: 50px;"><a href="<{:U('delete','','')}>/img/<{$row['img']}>/id/<{$row['id']}>">删除</a></td>
					
				</tr>
				</volist>
			</table>
			<p><{$show}></p>
	</div>
</block>